#include "mainwindow.h"

#include "DebugOutput.h"
#include "interface/interfaceplugin.h"
#include "./PluginsManager/PluginsManager.h"
#include <QPluginLoader>
#include <QFileInfo>

#include <QApplication>
#include <QDebug>

//#include <QSerialPort>
//#include <QSerialPortInfo>
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    Logger::setDebugOutput(qApp->applicationDirPath()+"/log/%1.log"
                           ,true
                           ,Logger::Flag::OUTPUT_FILEANDSTDERR
                           ,Logger::logger_level::ALL
                           ,true);
    //加载exe所在目录下  plugin文件夹的所有插件
	//PluginsManager &pluginMnaager = PluginsManager::getInstance();
	PluginsManager::getInstance().loadAllPlugins();
    PluginsManager::getInstance().initSignalAndSlot();
    PluginsManager::getInstance().logAllPlugins();
    MainWindow w;
    w.show();
    return a.exec();
}
